from rest_framework import serializers

from sys_manager.models import DeptModel


class DeptSerializer(serializers.ModelSerializer):
    '''
    用户所在用户的序列化
    
    '''
    #序列化时的属性,把日期类型属性格式化成字符串
    create_time=serializers.DateTimeField(format="%Y-%m-%d %H:%M:%S",read_only=True)

    class Meta:
        model=DeptModel
        fields='__all__'
